<?php echo $this->Html->script('JqueryContact'); ?>
<div class="contacts index">
	<h2><?php echo __('Contacts'); ?></h2>

	<table cellpadding="0" cellspacing="0" id="contact" class="search">
	<thead>
	<tr>
			<th><?php echo $this->Paginator->sort('first_name'); ?></th>
			<th><?php echo $this->Paginator->sort('middle_name'); ?></th>
			<th><?php echo $this->Paginator->sort('last_name'); ?></th>
			<th><?php echo $this->Paginator->sort('gender'); ?></th>
			<th><?php echo $this->Paginator->sort('position'); ?></th>
			<th><?php echo $this->Paginator->sort('organisation'); ?></th>
			<th><?php echo $this->Paginator->sort('email'); ?></th>
			<th><?php echo $this->Paginator->sort('mobile'); ?></th>
			<!--<th><?php echo $this->Paginator->sort('home'); ?></th>
			<th><?php echo $this->Paginator->sort('office'); ?></th>
			<th><?php echo $this->Paginator->sort('address'); ?></th>
			<th><?php echo $this->Paginator->sort('notes'); ?></th>
			<th><?php echo $this->Paginator->sort('list'); ?></th>
			<th><?php echo $this->Paginator->sort('created_date'); ?></th>
			<th><?php echo $this->Paginator->sort('modified_date'); ?></th>-->
	</tr>
	</thead>
	<tbody>
	<?php
                if (!empty($contacts)){
                    foreach ($contacts as $contact):
                ?>
	<tr>
		<td><?php echo $this->Html->link($contact['Contact']['first_name'], array('action' => 'view', $contact['Contact']['id'])); ?></td>
		<td><?php echo h($contact['Contact']['middle_name']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['last_name']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['gender']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['position']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['organisation']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['email']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['mobile']); ?>&nbsp;</td>
		<!--<td><?php echo h($contact['Contact']['home']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['office']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['address']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['country']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['nationality']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['notes']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['list']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['created_date']); ?>&nbsp;</td>
		<td><?php echo h($contact['Contact']['modified_date']); ?>&nbsp;</td>-->

    </tr>
            	<?php
                                endforeach;
                            }else{
                            ?>
                            <tr>
                                <td>No Data Found</td>
                            </tr>
                            <?php }?>
	</tbody>
            	</table>
            	<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>

                                   <div class="addbuttons" >
										
											<?php echo $this->Html->link(__('New Contact'), array('controller' => 'contacts', 'action' => 'add')); ?> 
											<?php echo $this->Html->link(__('Import New File'), array('controller' => 'contacts', 'action' => 'upload')); ?>
										
									</div>
                                            

                            	<p>

                    	<p>
            	<!--<?php
            	echo $this->Paginator->counter(array(
            	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
            	));
            	?>
            	<div class="paging">
            	<?php
            		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
            		echo $this->Paginator->numbers(array('separator' => ''));
            		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
            	?>
            	</div>-->
            </div>

